<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../ext-4.0/resources/css/ext-all.css" />
<script type="text/javascript" src="../../ext-4.0/bootstrap.js"></script>
<script type="text/javascript" src="../../ext-4.0/locale/ext-lang-zh_CN.js"></script>
<style type="text/css">
body{
	font-size:11pt;
	color:black;
	padding:5px;
	font-family:'Arial';
}
.myclass{
	color:blue;
}
</style>
<script language="javascript">
	Ext.onReady(function(){
		var panel = new Ext.Panel({
			title : 'Ext.core.DomHelper示例',
			width : '280px',
			height : '240px',
			renderTo : 'sub1',
			buttons : [{
				text : 'text',
				handler : function(){
					//给指定的div1在其后插入一个新的div
					Ext.core.DomHelper.insertAfter(Ext.get("div1"),{
						id: 'item2', html: "<div id='div2' style='height:60px;padding:5px;background-color:#FEFCE7'>我是新追加的Div对象</div>"
					});
				}
			}],
			html : '<div id="div1" style="height:60px;padding:5px;background-color:#D4D4D4">我是原来的Div对象</div>'
		});
	});
</script>
</head>
<body>
	<div id="sub1"></div>
</body>
</html>
